SET TERMOUT ON; PROMPT Building demonstration tables. Please wait. SET TERMOUT OFF /************************************************************************* * ±âÁ¸¿¡ ÀúÀåµÇ ÀÖ´Â STUDENT, PROFESSOR, DEPARTMENT, SALGRADE Å×ÀÌºí »èÁ¦ *************************************************************************/ DROP TABLE STUDENT; DROP TABLE PROFESSOR; DROP TABLE DEPARTMENT; DROP TABLE SALGRADE; /************************************************************************* * STUDNET Å×À̺í * TO_DATE('02-JUL-1979','DD-MON-YYYY') ÀÌ·± ºÎºÐÀ» * TO_DATE('02-07-1979','DD-MM-YYYY') ÇüÅ·Π¼öÁ¤ÇÏ¼Å¾ß µË´Ï´Ù. *************************************************************************/ CREATE TABLE STUDENT (STUDNO NUMBER(5), NAME VARCHAR2(10), USERID varchar2(10), GRADE VARCHAR2(1), IDNUM VARCHAR2(13), BIRTHDATE DATE, TEL VARCHAR2(13), HEIGHT NUMBER(5,2), WEIGHT NUMBER(5,2), DEPTNO NUMBER(4), PROFNO NUMBER(4)); INSERT INTO STUDENT VALUES (10101, 'ÀüÀÎÇÏ', 'jun123', '4', '7907021369824', TO_DATE('02-07-1979','DD-MM-YYYY'), '051)781-2158', 176, 72, '101',9903); INSERT INTO STUDENT VALUES (20101, 'À̵¿ÈÆ', 'Dals', '1', '8312101128467', TO_DATE('10-12-1983','DD-MM-YYYY'), '055)426-1752', 172, 64, '201',NULL); INSERT INTO STUDENT VALUES (10102, '¹Ú¹Ì°æ', 'ansel414', '1', '8405162123648', TO_DATE('16-03-1984','DD-MM-YYYY'), '055)261-8947', 168, 52, '101',NULL); INSERT INTO STUDENT VALUES (10103, '±è¿µ±Õ', 'mandu', '3', '8103211063421', TO_DATE('11-01-1981','DD-MM-YYYY'), '051)824-9637', 170, 88 ,'101',9906); INSERT INTO STUDENT VALUES (20102, '¹Úµ¿Áø', 'Ping2', '1', '8511241639826', TO_DATE('24-11-1985','DD-MM-YYYY'), '051)742-6384', 182, 70, '201',NULL); INSERT INTO STUDENT VALUES (10201, '±èÁø¿µ', 'simply', '2', '8206062186327', TO_DATE('06-06-1982','DD-MM-YYYY'), '055)419-6328', 164, 48, '102',9905); INSERT INTO STUDENT VALUES (10104, 'ÁöÀº°æ', 'Gomo00', '2', '8004122298371', TO_DATE('12-04-1980','DD-MM-YYYY'), '055)418-9627', 161, 42, '101',9907); INSERT INTO STUDENT VALUES (10202, '¿ÀÀ¯¼®', 'yousuk', '4', '7709121128379', TO_DATE('12-10-1977','DD-MM-YYYY'), '051)724-9618', 177, 92, '102',9905); INSERT INTO STUDENT VALUES (10203, 'Çϳª¸®', 'hanal', '1', '8501092378641', TO_DATE('18-12-1984','DD-MM-YYYY'), '055)296-3784', 160, 68, '102',NULL); INSERT INTO STUDENT VALUES (10105, 'ÀÓÀ¯Áø', 'YouJin12', '2', '8301212196482', TO_DATE('21-01-1983','DD-MM-YYYY'), '02)312-9838', 171, 54, '101',9907); INSERT INTO STUDENT VALUES (10106, '¼­ÀçÁø', 'seolly', '1', '8511291186273', TO_DATE('29-11-1985','DD-MM-YYYY'), '051)239-4861', 186, 72, '101',NULL); INSERT INTO STUDENT VALUES (10204, 'À±Áø¿í', 'Samba7', '3', '7904021358671', TO_DATE('02-04-1979','DD-MM-YYYY'), '053)487-2698', 171, 70, '102',9905); INSERT INTO STUDENT VALUES (10107, 'À̱¤ÈÆ', 'huriky', '4', '8109131276431', TO_DATE('13-10-1981','DD-MM-YYYY'), '055)736-4981', 175, 92, '101',9903); INSERT INTO STUDENT VALUES (20103, '±èÁø°æ', 'lovely', '2', '8302282169387', TO_DATE('28-02-1983','DD-MM-YYYY'), '052)175-3941', 166, 51, '201',9902); INSERT INTO STUDENT VALUES (20104, 'Á¶¸íÈÆ', 'Rader214', '1', '8412141254963', TO_DATE('16-09-1984','DD-MM-YYYY'), '02)785-6984', 184, 62, '201',NULL); INSERT INTO STUDENT VALUES (10108, '·ù¹ÎÁ¤', 'cleanSky', '2', '8108192157498', TO_DATE('19-08-1981','DD-MM-YYYY'), '055)248-3679', 162, 72, '101',9907); /************************************************************************* * PROFESSOR Å×À̺í *************************************************************************/ CREATE TABLE PROFESSOR (PROFNO NUMBER(4), NAME VARCHAR2(10), USERID VARCHAR2(10), POSITION VARCHAR2(20), SAL NUMBER(10), HIREDATE DATE, COMM NUMBER(2), DEPTNO NUMBER(4)); INSERT INTO PROFESSOR VALUES (9901, '±èµµÈÆ', 'capool', '±³¼ö', 500, TO_DATE('24-06-1982','DD-MM-YYYY'), 20, 101); INSERT INTO PROFESSOR VALUES (9902, 'ÀÌÀç¿ì', 'sweat413', 'Á¶±³¼ö', 320, TO_DATE('12-04-1995','DD-MM-YYYY'), NULL, 201); INSERT INTO PROFESSOR VALUES (9903, '¼º¿¬Èñ', 'Pascal', 'Á¶±³¼ö', 360, TO_DATE('17-03-1993','DD-MM-YYYY'), 15, 101); INSERT INTO PROFESSOR VALUES (9904, '¿°ÀÏ¿õ', 'Blue77', 'ÀüÀÓ°­»ç', 240, TO_DATE('02-10-1998','DD-MM-YYYY'), NULL, 102); INSERT INTO PROFESSOR VALUES (9905, '±ÇÇõÀÏ', 'refresh', '±³¼ö', 450, TO_DATE('08-01-1986','DD-MM-YYYY'), 25, 102); INSERT INTO PROFESSOR VALUES (9906, 'À̸¸½Ä', 'Pocari', 'ºÎ±³¼ö', 420, TO_DATE('13-09-1988','DD-MM-YYYY'), NULL, 101); INSERT INTO PROFESSOR VALUES (9907, 'ÀüÀºÁö', 'totoro', 'ÀüÀÓ°­»ç', 210, TO_DATE('01-06-2001','DD-MM-YYYY'), NULL, 101); INSERT INTO PROFESSOR VALUES (9908, '³²ÀºÇõ', 'Bird13', 'ºÎ±³¼ö', 400, TO_DATE('18-11-1990','DD-MM-YYYY'), 17, 202); /************************************************************************* * DEPARTMENT Å×À̺í *************************************************************************/ CREATE TABLE DEPARTMENT (DEPTNO NUMBER(4), DNAME VARCHAR2(26), COLLEGE NUMBER(4), LOC VARCHAR2(10)); INSERT INTO DEPARTMENT VALUES (101, 'ÄÄÇ»ÅÍ°øÇаú' , 100 ,'1È£°ü'); INSERT INTO DEPARTMENT VALUES (102, '¸ÖƼ¹Ìµð¾îÇаú' , 100 ,'2È£°ü'); INSERT INTO DEPARTMENT VALUES (201, 'ÀüÀÚ°øÇаú' , 200 ,'3È£°ü'); INSERT INTO DEPARTMENT VALUES (202, '±â°è°øÇаú' , 200 ,'4È£°ü'); INSERT INTO DEPARTMENT VALUES (100, 'Á¤º¸¹Ìµð¾îÇкÎ' , 10 , NULL); INSERT INTO DEPARTMENT VALUES (200, '¸ÞÄ«Æ®·Î´Ð½ºÇкÎ', 10 , NULL); INSERT INTO DEPARTMENT VALUES (10, '°ø°ú´ëÇÐ' , NULL , NULL); /************************************************************************* * SALGRADE Å×À̺í *************************************************************************/ CREATE TABLE SALGRADE (GRADE NUMBER(2), LOSAL NUMBER(5), HISAL NUMBER(5)); INSERT INTO SALGRADE VALUES (1, 100, 300); INSERT INTO SALGRADE VALUES (2, 301, 400); INSERT INTO SALGRADE VALUES (3, 401, 500); COMMIT; SET TERMOUT ON PROMPT Demonstration table build is complete. col name for a15 col idnum for a15 col tel for a16 col position for a16 purge recyclebin; select * from tab; --select * from student; host del /q *.* exit